//
//  SelectItemButton.m
//  MigrantBird
//
//  Created by michael shen on 16/5/10.
//  Copyright © 2016年 fc. All rights reserved.
//

#import "SelectItemButton.h"

@implementation SelectItemButton

-(id)initWithFrame:(CGRect)frame{
    if (self == [super initWithFrame:frame]) {
        UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.frameWidth, 40)];
        imageView.contentMode = UIViewContentModeCenter;
        [self addSubview:imageView];
        self.selectImageView = imageView;
        
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 40, self.frameWidth, 14)];
        label.textAlignment = NSTextAlignmentCenter;
        label.font = [UIFont boldSystemFontOfSize:12];
        label.textColor = [UIColor blackColor];
        [self addSubview:label];
        self.selectLabel = label;
    }
    return self;
}

-(void)setSelectInfoImageName:(NSString*)name andLabelName:(NSString*)labelName{
    self.selectImageView.image = [UIImage imageNamed:name];
    self.selectLabel.text = labelName;
}
@end
